* use QVectors for filter and format arguments.
This includes a work around MSVC 2015 errors C2440, C2664. See
the conditional code in defs.h.
* restore accidental deletion of include file.
static struct wprdata WPR;
static struct trldata TRL;
-static arglist_t wpr_args[] = {
+static QVector<arglist_t> wpr_args = {
/*
{"os3", &osversion, "Operating system version 3",
NULL, ARGTYPE_BOOL, ARGNOMINMAX },
*/
- ARG_TERMINATOR
};
-static arglist_t trl_args[] = {
+static QVector<arglist_t> trl_args = {
/*
{"os3", &osversion, "Operating system version 3",
NULL, ARGTYPE_BOOL, ARGNOMINMAX },
*/
- ARG_TERMINATOR
};
/**************************************************************************/
wpr_read,
wpr_write,
alan_exit,
- wpr_args,
+ &wpr_args,
CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
NULL_POS_OPS,
trl_read,
trl_write,
alan_exit,
- trl_args,
+ &trl_args,
CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
NULL_POS_OPS,
static roadchange* roadchanges = nullptr;
static
-arglist_t an1_args[] = {
+QVector<arglist_t> an1_args = {
{
"type", &output_type, "Type of .an1 file",
"", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"radius", &opt_radius, "Radius for circles",
nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct guid_t {
my_read,
my_write,
nullptr,
- an1_args,
+ &an1_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
class ArcDistanceFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
Waypoint* arcpt1, * arcpt2;
};
- arglist_t args[8] = {
+ QVector<arglist_t> args = {
{
"file", &arcfileopt, "File containing vertices of arc",
nullptr, ARGTYPE_FILE, ARG_NOMINMAX, nullptr
"project", &projectopt, "Move waypoints to its projection on lines or vertices",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
void arcdist_arc_disp_wpt_cb(const Waypoint* arcpt2);
static char* prefer_shortnames_opt;
static
-arglist_t bcr_args[] = {
+QVector<arglist_t> bcr_args = {
{
"index", &rtenum_opt, "Index of route to write (if more than one in source)",
nullptr, ARGTYPE_INT, "1", nullptr, nullptr
"prefer_shortnames", &prefer_shortnames_opt, "Use shortname instead of description",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct bcr_icon_mapping_t {
bcr_data_read,
bcr_data_write,
nullptr,
- bcr_args,
+ &bcr_args,
CET_CHARSET_MS_ANSI, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr
class BendFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
RouteList* routes_orig = nullptr;
- arglist_t args[3] = {
+ QVector<arglist_t> args = {
{
"distance", &distopt, "Distance to the bend in meters where the new points will be added",
"25", ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
"minangle", &minangleopt, "Minimum bend angle in degrees", "5",
ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
Waypoint* create_wpt_dest(const Waypoint* wpt_orig, double lat_orig,
}
}
-static arglist_t brauniger_iq_args[] = {
- ARG_TERMINATOR
+static QVector<arglist_t> brauniger_iq_args = {
};
ff_vecs_t brauniger_iq_vecs = {
data_read,
nullptr,
nullptr,
- brauniger_iq_args,
+ &brauniger_iq_args,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
, NULL_POS_OPS,
nullptr
static short_handle mkshort_handle = nullptr;
static
-arglist_t bushnell_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> bushnell_args = {
};
// Apparently, the icons are undocumented, so we made up names,
bushnell_read,
bushnell_write,
nullptr,
- bushnell_args,
+ &bushnell_args,
CET_CHARSET_MS_ANSI, 0, /* Not really sure... */
NULL_POS_OPS,
nullptr
static route_head* trk_head;
static
-arglist_t bushnell_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> bushnell_args = {
};
static void
bushnell_read,
bushnell_write,
nullptr,
- bushnell_args,
+ &bushnell_args,
CET_CHARSET_MS_ANSI, 0, /* Not really sure... */
NULL_POS_OPS,
nullptr
static char* option_snlen;
static
-arglist_t compegps_args[] = {
+QVector<arglist_t> compegps_args = {
{
"deficon", &option_icon, "Default icon name",
nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"snlen", &option_snlen, "Length of generated shortnames (default 16)",
"16", ARGTYPE_INT, "1", nullptr, nullptr
},
- ARG_TERMINATOR
};
static
compegps_data_read,
compegps_data_write,
nullptr,
- compegps_args,
+ &compegps_args,
CET_CHARSET_MS_ANSI, 1
, NULL_POS_OPS,
nullptr
/* placeholders for options */
static
-arglist_t cst_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> cst_args = {
};
/* helpers */
cst_data_read,
nullptr, /* cst_data_write, */
nullptr,
- cst_args,
+ &cst_args,
CET_CHARSET_MS_ANSI, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define ARGTYPE_FLAGMASK 0xfffff000U
#define ARG_NOMINMAX nullptr, nullptr
-#define ARG_TERMINATOR {nullptr, nullptr, nullptr, nullptr, 0, ARG_NOMINMAX, nullptr}
struct arglist_t {
const char* argstring;
char** argval;
const char* helpstring;
const char* defaultvalue;
- const uint32_t argtype;
+#if !defined(_MSC_VER) || (_MSC_VER >= 1910) /* !MSVC or MSVC 2017 or newer */
+ const uint32_t argtype{ARGTYPE_UNKNOWN};
+#else
+ /* MSVC 2015 generates C2440, C2664 errors with the above. */
+ uint32_t argtype;
+#endif
const char* minvalue; /* minimum value for numeric options */
const char* maxvalue; /* maximum value for numeric options */
char* argvalptr; /* !!! internal helper. Not used in definitions !!! */
ff_read read;
ff_write write;
ff_exit exit;
- arglist_t* args;
+ QVector<arglist_t>* args;
QString encode;
int fixed_encode;
position_ops_t position_ops;
ff_vecs_t* find_vec(const QString&);
void assign_option(const QString& vecname, arglist_t* arg, const char* val);
-void disp_vec_options(const QString& vecname, const arglist_t* args);
+void disp_vec_options(const QString& vecname, const QVector<arglist_t>* args);
void disp_vecs();
void disp_vec(const QString& vecname);
-void validate_options(const QStringList& options, const arglist_t* args, const QString& name);
-bool validate_args(const QString& name, const arglist_t* args);
+void validate_options(const QStringList& options, const QVector<arglist_t>* args, const QString& name);
+bool validate_args(const QString& name, const QVector<arglist_t>* args);
bool validate_formats();
void init_vecs();
void exit_vecs();
#define DST_ITINERARY "City->Street"
static
-arglist_t destinator_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> destinator_args = {
};
static gbfile* fin, *fout;
destinator_read_poi_wrapper,
destinator_write_poi,
nullptr,
- destinator_args,
+ &destinator_args,
CET_CHARSET_UTF8, 1 /* fixed */
, NULL_POS_OPS,
nullptr};
destinator_read_rte_wrapper,
destinator_write_rte,
nullptr,
- destinator_args,
+ &destinator_args,
CET_CHARSET_UTF8, 1 /* fixed */
, NULL_POS_OPS,
nullptr};
destinator_read_trk_wrapper,
destinator_write_trk,
nullptr,
- destinator_args,
+ &destinator_args,
CET_CHARSET_UTF8, 1 /* fixed */
, NULL_POS_OPS,
nullptr };
static char* erase_only;
static
-arglist_t dg100_args[] = {
+QVector<arglist_t> dg100_args = {
{
"erase", &erase, "Erase device data after download",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"erase_only", &erase_only, "Only erase device data, do not download anything",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*******************************************************************************
dg100_read,
nullptr,
nullptr,
- dg100_args,
+ &dg100_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
dg100_read,
nullptr,
nullptr,
- dg100_args,
+ &dg100_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
class DiscardFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
gpsdata_type what;
route_head* head;
- arglist_t args[13] = {
+ QVector<arglist_t> args = {
{
"hdop", &hdopopt, "Suppress points with higher hdop",
"-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
"Suppress points where type matches given name", nullptr, ARGTYPE_STRING,
ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
void fix_process_wpt(const Waypoint* wpt);
static int track_index, this_index;
static
-arglist_t dmtlog_args[] = {
+QVector<arglist_t> dmtlog_args = {
{
"index", &opt_index,
"Index of track (if more than one in source)", "1", ARGTYPE_INT, "1", nullptr, nullptr
},
- ARG_TERMINATOR
};
dmtlog_read,
dmtlog_write,
nullptr,
- dmtlog_args,
+ &dmtlog_args,
CET_CHARSET_ASCII, 0
, NULL_POS_OPS,
nullptr
class DuplicateFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
char* purge_duplicates = nullptr;
char* correct_coords = nullptr;
- arglist_t args[5] = {
+ QVector<arglist_t> args = {
{
"shortname", &snopt, "Suppress duplicate waypoints based on name",
nullptr, ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"correct", &correct_coords, "Use coords from duplicate points",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct btree_node {
#define MYNAME "EasyGPS"
static
-arglist_t easygps_args[] = {
+QVector<arglist_t> easygps_args = {
/* {"deficon", &deficon, "Default icon name", "Waypoint",
ARGTYPE_STRING}, */
- ARG_TERMINATOR
};
static void
data_read,
data_write,
nullptr,
- easygps_args,
+ &easygps_args,
CET_CHARSET_ASCII, 0 /* CET REVIEW */
, NULL_POS_OPS,
nullptr
static uint8_t writer_gps_tag_version[4] = {2, 0, 0, 0};
-static arglist_t exif_args[] = {
+static QVector<arglist_t> exif_args = {
{ "filename", &opt_filename, "Set waypoint name to source filename", "Y", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{ "frame", &opt_frame, "Time-frame (in seconds)", "10", ARGTYPE_INT, "0", nullptr, nullptr },
{ "name", &opt_name, "Locate waypoint for tagging by this name", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{ "overwrite", &opt_overwrite, "!OVERWRITE! the original file. Default=N", "N", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
// for debug only
exif_read,
exif_write,
nullptr,
- exif_args,
+ &exif_args,
CET_CHARSET_UTF8, 0,
NULL_POS_OPS,
nullptr
static
-arglist_t f90g_track_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> f90g_track_args = {
};
/*******************************************************************************
f90g_track_read,
nullptr,
nullptr,
- f90g_track_args,
+ &f90g_track_args,
CET_CHARSET_UTF8, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
Filter(Filter&&) = default;
Filter& operator=(Filter&&) = default;
- virtual arglist_t* get_args() = 0;
+ virtual QVector<arglist_t>* get_args() = 0;
virtual void init()
{
#include <QtCore/QtGlobal> // for qPrintable
#include <algorithm> // for sort
+#include <cassert> // for assert
#include <cstdio> // for printf
continue;
}
- arglist_t* args = vec.vec->get_args();
+ QVector<arglist_t>* args = vec.vec->get_args();
validate_options(options, args, vec.name);
/* step 1: initialize by inifile or default values */
- if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- QString qtemp = inifile_readstr(global_opts.inifile, vec.name, arg->argstring);
+ if (args && !args->isEmpty()) {
+ assert(args->isDetached());
+ for (auto& arg : *args) {
+ QString qtemp = inifile_readstr(global_opts.inifile, vec.name, arg.argstring);
if (qtemp.isNull()) {
- qtemp = inifile_readstr(global_opts.inifile, "Common filter settings", arg->argstring);
+ qtemp = inifile_readstr(global_opts.inifile, "Common filter settings", arg.argstring);
}
if (qtemp.isNull()) {
- assign_option(vec.name, arg, arg->defaultvalue);
+ assign_option(vec.name, &arg, arg.defaultvalue);
} else {
- assign_option(vec.name, arg, CSTR(qtemp));
+ assign_option(vec.name, &arg, CSTR(qtemp));
}
}
}
/* step 2: override settings with command-line values */
if (!options.isEmpty()) {
- if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- const QString opt = get_option(options, arg->argstring);
+ if (args && !args->isEmpty()) {
+ assert(args->isDetached());
+ for (auto& arg : *args) {
+ const QString opt = get_option(options, arg.argstring);
if (!opt.isNull()) {
- assign_option(vec.name, arg, CSTR(opt));
+ assign_option(vec.name, &arg, CSTR(opt));
}
}
}
void
free_filter_vec(Filter* filter)
{
- arglist_t* args = filter->get_args();
-
- if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (arg->argvalptr) {
- xfree(arg->argvalptr);
- arg->argvalptr = *arg->argval = nullptr;
+ QVector<arglist_t>* args = filter->get_args();
+
+ if (args && !args->isEmpty()) {
+ assert(args->isDetached());
+ for (auto& arg : *args) {
+ if (arg.argvalptr) {
+ xfree(arg.argvalptr);
+ arg.argvalptr = *arg.argval = nullptr;
}
}
}
init_filter_vecs()
{
for (const auto& vec : filter_vec_list) {
- arglist_t* args = vec.vec->get_args();
- if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- arg->argvalptr = nullptr;
+ QVector<arglist_t>* args = vec.vec->get_args();
+ if (args && !args->isEmpty()) {
+ assert(args->isDetached());
+ for (auto& arg : *args) {
+ arg.argvalptr = nullptr;
}
}
}
for (const auto& vec : filter_vec_list) {
printf(" %-20.20s %-50.50s\n",
qPrintable(vec.name), qPrintable(vec.desc));
- arglist_t* args = vec.vec->get_args();
+ const QVector<arglist_t>* args = vec.vec->get_args();
if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN))
+ for (const auto& arg : *args) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN))
printf(" %-18.18s %-.50s %s\n",
- arg->argstring, arg->helpstring,
- (arg->argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
+ arg.argstring, arg.helpstring,
+ (arg.argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
}
}
}
}
printf(" %-20.20s %-50.50s\n",
qPrintable(vec.name), qPrintable(vec.desc));
- arglist_t* args = vec.vec->get_args();
+ const QVector<arglist_t>* args = vec.vec->get_args();
if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN))
+ for (const auto& arg : *args) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN))
printf(" %-18.18s %-.50s %s\n",
- arg->argstring, arg->helpstring,
- (arg->argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
+ arg.argstring, arg.helpstring,
+ (arg.argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
}
}
}
{
disp_help_url(vec, nullptr);
printf("\n");
- arglist_t* args = vec.vec->get_args();
+ const QVector<arglist_t>* args = vec.vec->get_args();
if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN)) {
+ for (const auto& arg : *args) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN)) {
printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
CSTR(vec.name),
- arg->argstring,
- arg->helpstring,
- name_option(arg->argtype),
- arg->defaultvalue ? arg->defaultvalue : "",
- arg->minvalue ? arg->minvalue : "",
- arg->maxvalue ? arg->maxvalue : "");
- disp_help_url(vec, arg);
+ arg.argstring,
+ arg.helpstring,
+ name_option(arg.argtype),
+ arg.defaultvalue ? arg.defaultvalue : "",
+ arg.minvalue ? arg.minvalue : "",
+ arg.maxvalue ? arg.maxvalue : "");
+ disp_help_url(vec, &arg);
printf("\n");
}
}
filter_process f_process;
filter_deinit f_deinit;
filter_exit f_exit;
- arglist_t* args;
+ QVector<arglist_t>* args;
};
Filter* find_filter_vec(const QString&);
// Values for ARGTYPE_xxx can be found in defs.h and are used to
// select the type of option.
static
-arglist_t format_skeleton_args[] = {
+QVector<arglist_t> format_skeleton_args = {
// {"foo", &fooopt, "The text of the foo option in help",
// "default", ARGYTPE_STRING, ARG_NOMINMAX} ,
- ARG_TERMINATOR
};
/*******************************************************************************
format_skeleton_read,
format_skeleton_write,
format_skeleton_exit,
- format_skeleton_args,
+ &format_skeleton_args,
CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
NULL_POS_OPS, // Unless you do realtime positioning
static int event_ct;
static
-arglist_t g7towin_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> g7towin_args = {
};
#define WAYPT__OFS 0x00000
data_read,
nullptr,
nullptr,
- g7towin_args,
+ &g7towin_args,
CET_CHARSET_MS_ANSI, 0
, NULL_POS_OPS,
nullptr
static const char* valid_waypt_chars = MILITANT_VALID_WAYPT_CHARS " ";
static
-arglist_t garmin_args[] = {
+QVector<arglist_t> garmin_args = {
{
"snlen", &snlen, "Length of generated shortnames", nullptr,
ARGTYPE_INT, "1", nullptr, nullptr
"baud", &baudopt, "Speed in bits per second of serial port (baud=9600)",
nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
static const char* d103_symbol_from_icon_number(unsigned int n);
data_read,
data_write,
nullptr,
- garmin_args,
+ &garmin_args,
CET_CHARSET_ASCII, 0,
{ pvt_init, pvt_read, rw_deinit, nullptr, nullptr, nullptr },
nullptr
static
-arglist_t fit_args[] = {
+QVector<arglist_t> fit_args = {
{
"allpoints", &opt_allpoints,
"Read all points even if latitude or longitude is missing",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
const std::vector<std::pair<QString, int> > kCoursePointTypeMapping = {
fit_read,
fit_write,
nullptr,
- fit_args,
+ &fit_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static double defspeed, defproximity;
static int alerts;
-static arglist_t garmin_gpi_args[] = {
+static QVector<arglist_t> garmin_gpi_args = {
{
"alerts", &opt_alerts, "Enable alerts on speed or proximity distance",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"languagecode", &opt_lang, "language code to use for reading dual language files",
nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct reader_data_t {
garmin_gpi_read,
garmin_gpi_write,
nullptr,
- garmin_gpi_args,
+ &garmin_gpi_args,
CET_CHARSET_MS_ANSI, 0 /* WIN-CP1252 */
, NULL_POS_OPS,
nullptr
static char* opt_grid = nullptr;
static
-arglist_t garmin_txt_args[] = {
+QVector<arglist_t> garmin_txt_args = {
{"date", &opt_date_format, "Read/Write date format (i.e. yyyy/mm/dd)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"datum", &opt_datum, "GPS datum (def. WGS 84)", "WGS 84", ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"dist", &opt_dist, "Distance unit [m=metric, s=statute]", "m", ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"temp", &opt_temp, "Temperature unit [c=Celsius, f=Fahrenheit]", "c", ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"time", &opt_time_format, "Read/Write time format (i.e. HH:mm:ss xx)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"utc", &opt_utc, "Write timestamps with offset x to UTC time", nullptr, ARGTYPE_INT, "-23", "+23", nullptr},
- ARG_TERMINATOR
};
struct info_t {
garmin_txt_read,
garmin_txt_write,
nullptr,
- garmin_txt_args,
+ &garmin_txt_args,
CET_CHARSET_MS_ANSI, 0
, NULL_POS_OPS,
nullptr
static char* opt_trk_header = nullptr;
static
-arglist_t format_garmin_xt_args[] = {
+QVector<arglist_t> format_garmin_xt_args = {
{"ftype", &opt_xt_ftype, "Garmin Mobile XT ([ATRK]/STRK)", "ATRK", ARGTYPE_STRING | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr},
// TODO: SHIFT - can't test behaviour, do not have appropriate files
//{"trk_header_opt", &opt_trk_header, "Track name processing option ([0]-nrm/1-ign/2-sht)", "0", ARGTYPE_INT, ARG_NOMINMAX},
{"trk_header", &opt_trk_header, "Track name processing option ([0]-nrm/1-ign)", "0", ARGTYPE_INT, ARG_NOMINMAX, nullptr},
- ARG_TERMINATOR
};
/*******************************************************************************
format_garmin_xt_read,
nullptr,
nullptr,
- format_garmin_xt_args,
+ &format_garmin_xt_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
#define GDB_OPT_BITCATEGORY "bitscategory"
#define GDB_OPT_ROADBOOK "roadbook"
-static arglist_t gdb_args[] = {
+static QVector<arglist_t> gdb_args = {
{
GDB_OPT_CATEGORY, &gdb_opt_category,
"Default category on output (1..16)",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
ff_vecs_t gdb_vecs = {
read_data,
write_data,
nullptr,
- gdb_args,
+ &gdb_args,
CET_CHARSET_MS_ANSI, 0 /* O.K.: changed to NON-FIXED */
/* because of utf8 strings since GDB V3 */
, NULL_POS_OPS,
static QXmlStreamWriter writer(&ostring);
static
-arglist_t geo_args[] = {
+QVector<arglist_t> geo_args = {
{"deficon", &deficon, "Default icon name", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{"nuke_placer", &nuke_placer, "Omit Placer name", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
#define MYNAME "geo"
geo_read,
geo_write,
nullptr,
- geo_args,
+ &geo_args,
CET_CHARSET_UTF8, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr
static const QString URL = QStringLiteral("url");
static const QString URLNAME = QStringLiteral("urlname");
-static arglist_t geojson_args[] = {
+static QVector<arglist_t> geojson_args = {
{"compact", &compact_opt, "Compact Output. Default is off.",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr } ,
- ARG_TERMINATOR
};
static void
geojson_read,
geojson_write,
nullptr,
- geojson_args,
+ &geojson_args,
CET_CHARSET_UTF8, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static int ggv_log_ver;
static
-arglist_t ggv_log_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> ggv_log_args = {
};
/*******************************************************************************
ggv_log_read,
ggv_log_write,
nullptr,
- ggv_log_args,
+ &ggv_log_args,
CET_CHARSET_ASCII, 1
, NULL_POS_OPS,
nullptr
#define MYNAME "ggv_ovl"
static
-arglist_t ggv_ovl_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> ggv_ovl_args = {
};
enum OVL_SYMBOL_TYP {
ggv_ovl_read,
ggv_ovl_write,
nullptr,
- ggv_ovl_args,
+ &ggv_ovl_args,
CET_CHARSET_MS_ANSI, 0
, NULL_POS_OPS,
nullptr
static gbfile* in_file = nullptr; // used for reading from bin/RAW datadump files, useful for testing
static
-arglist_t globalsat_args[] = {
+QVector<arglist_t> globalsat_args = {
{"showlist", &showlist, "list tracks", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr},
{"track", &track, "get track", "0", ARGTYPE_INT, ARG_NOMINMAX, nullptr},
{"dump-file", &opt_dump_file, "Dump raw data to this file", nullptr, ARGTYPE_OUTFILE, ARG_NOMINMAX, nullptr},
{"input-is-dump-file", &opt_input_dump_file, "Dump raw data to this file", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr},
- ARG_TERMINATOR
};
enum globalsat_commands_e {
data_read, // read
nullptr, // write
nullptr, // exit
- globalsat_args, // args
+ &globalsat_args, // args
CET_CHARSET_ASCII, // encode
0, // fixed_encode
NULL_POS_OPS, // position_ops
#define MYNAME "glogbook"
static
-arglist_t glogbook_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> glogbook_args = {
};
/* Tracks */
glogbook_read,
glogbook_write,
nullptr,
- glogbook_args,
+ &glogbook_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define MYNAME "gnav_trl"
static
-arglist_t gnav_trl_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> gnav_trl_args = {
};
struct gnav_trl_t {
gnav_trl_read,
gnav_trl_write,
nullptr,
- gnav_trl_args,
+ &gnav_trl_args,
CET_CHARSET_UTF8, 1 /* CET - do nothing ! */
, NULL_POS_OPS,
nullptr
static double minspeed,maxspeed;
static struct tm opt_tm; /* converted "date" parameter */
static
-arglist_t gopal_args[] = {
+QVector<arglist_t> gopal_args = {
{"date", &optdate, "Complete date-free tracks with given date (YYYYMMDD).", nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr },
{"maxspeed", &optmaxspeed, "The maximum speed (km/h) traveling from waypoint to waypoint.", "200", ARGTYPE_INT, "1", "1000", nullptr },
{"minspeed", &optminspeed, "The minimum speed (km/h) traveling from waypoint to waypoint. Set >0 to remove duplicate waypoints", "0", ARGTYPE_INT, "0", "999", nullptr },
{"clean", &optclean, "Cleanup common errors in trackdata", "1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
#define CHECK_BOOL(a) if (a && (*a == '0')) a = NULL
gopal_read,
gopal_write,
gopal_exit,
- gopal_args,
+ &gopal_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static int doing_tracks;
static
-arglist_t gpssim_args[] = {
+QVector<arglist_t> gpssim_args = {
{
"wayptspd", &wayptspd, "Default speed for waypoints (knots/hr)",
nullptr, ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
"split", &splitfiles_opt, "Split input into separate files",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*
nullptr,
gpssim_write,
nullptr,
- gpssim_args,
+ &gpssim_args,
CET_CHARSET_ASCII, 0
, NULL_POS_OPS,
nullptr
}
static
-arglist_t gpx_args[] = {
+QVector<arglist_t> gpx_args = {
{
"snlen", &snlen, "Length of generated shortnames",
"32", ARGTYPE_INT, "1", nullptr, nullptr
"Precision of elevations, number of decimals",
"3", ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
ff_vecs_t gpx_vecs = {
gpx_read,
gpx_write,
gpx_exit,
- gpx_args,
+ &gpx_args,
CET_CHARSET_UTF8, 0, /* non-fixed to create non UTF-8 XML's for testing | CET-REVIEW */
NULL_POS_OPS,
nullptr,
}
static
-arglist_t gtm_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> gtm_args = {
};
ff_vecs_t gtm_vecs = {
gtm_read,
gtm_write,
nullptr,
- gtm_args,
+ >m_args,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr
static char* opt_sport, *opt_course;
static
-arglist_t gtc_args[] = {
+QVector<arglist_t> gtc_args = {
{
"course", &opt_course, "Write course rather than history, default yes",
"1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"sport", &opt_sport, "Sport: Biking (deflt), Running, MultiSport, Other",
"Biking", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/* Tracks */
gtc_read,
gtc_write,
nullptr,
- gtc_args,
+ >c_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
class HeightFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
char* wgs84tomslopt = nullptr;
double addf;
- arglist_t args[3] = {
+ QVector<arglist_t> args = {
{
"add", &addopt, "Adds a constant value to every altitude (meter, append \"f\" (x.xxf) for feet)",
nullptr, ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX, nullptr
"wgs84tomsl", &wgs84tomslopt, "Converts WGS84 ellipsoidal height to orthometric height (MSL)",
nullptr, ARGTYPE_END_REQ | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
double bilinear(double x1, double y1, double x2, double y2, double x, double y, double z11, double z12, double z21, double z22);
#define MYNAME "hiketech"
static
-arglist_t hiketech_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> hiketech_args = {
};
/* Waypoints */
hiketech_read,
hiketech_write,
nullptr,
- hiketech_args,
+ &hiketech_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define MYNAME "HTML"
static
-arglist_t html_args[] = {
+QVector<arglist_t> html_args = {
{
"stylesheet", &stylesheet,
"Path to HTML style sheet", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"altunits", &altunits,
"Units for altitude (f)eet or (m)etres", "m", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
nullptr,
data_write,
nullptr,
- html_args,
+ &html_args,
CET_CHARSET_UTF8, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static QMap<QString, Waypoint*> map;
static
-arglist_t humminbird_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> humminbird_args = {
};
/* Takes a latitude in degrees,
humminbird_read,
humminbird_write,
nullptr, // humminbird_exit,
- humminbird_args,
+ &humminbird_args,
CET_CHARSET_ASCII, 1 /* ascii is the expected character set */
/* currently fixed !!! */
, NULL_POS_OPS,
humminbird_read,
humminbird_track_write,
nullptr, // humminbird_exit,
- humminbird_args,
+ &humminbird_args,
CET_CHARSET_ASCII, 1 /* ascii is the expected character set */
/* currently fixed !!! */
, NULL_POS_OPS,
}
-static arglist_t igc_args[] = {
+static QVector<arglist_t> igc_args = {
{
"timeadj", &timeadj,
"(integer sec or 'auto') Barograph to GPS time diff",
nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
ff_vecs_t igc_vecs = {
data_read,
data_write,
nullptr,
- igc_args,
+ &igc_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
/* options */
static char* index_opt = nullptr;
-static arglist_t ignr_args[] = {
+static QVector<arglist_t> ignr_args = {
{"index", &index_opt, "Index of track to write (if more than one in source)", nullptr, ARGTYPE_INT, "1", nullptr , nullptr},
- ARG_TERMINATOR
};
ignr_read,
ignr_write,
nullptr,
- ignr_args,
+ &ignr_args,
CET_CHARSET_MS_ANSI, 1
, NULL_POS_OPS,
nullptr
static int in_point_count;
// Exported options list
-static arglist_t igo8_options[] = {
+static QVector<arglist_t> igo8_options = {
{ "tracknum", &igo8_option_tracknum, "Track identification number", nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr },
{ "title", &igo8_option_title, "Track title", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{ "description", &igo8_option_description, "Track description", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
// Sanity check
igo8_read,
igo8_write,
nullptr,
- igo8_options,
+ &igo8_options,
CET_CHARSET_UTF8,
1
, NULL_POS_OPS,
#include "xmlgeneric.h"
#include <QtCore/QXmlStreamAttributes>
-static arglist_t ikt_args[] = {
- ARG_TERMINATOR
+static QVector<arglist_t> ikt_args = {
};
#define MYNAME "ikt"
ikt_read,
nullptr,
nullptr,
- ikt_args,
+ &ikt_args,
CET_CHARSET_UTF8, 1
, NULL_POS_OPS,
nullptr
class InterpolateFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
double dist = 0;
char* opt_route = nullptr;
- arglist_t args[4] = {
+ QVector<arglist_t> args = {
{
"time", &opt_interval, "Time interval in seconds", nullptr,
ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_INT,
"route", &opt_route, "Interpolate routes instead", nullptr,
ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
};
// Values for ARGTYPE_xxx can be found in defs.h and are used to
// select the type of option.
static
-arglist_t itracku_args[] = {
+QVector<arglist_t> itracku_args = {
{ "backup", &backup_file_name, "Appends the input to a backup file", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{ "new", &only_new, "Only waypoints that are not the backup file", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
// "default", ARGYTPE_STRING, ARG_NOMINMAX} ,
- ARG_TERMINATOR
};
/*******************************************************************************
itracku_read,
nullptr,
itracku_exit,
- itracku_args,
+ &itracku_args,
CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
{ itracku_rt_init, itracku_rt_position, itracku_rt_deinit, nullptr, nullptr, nullptr },
itracku_read,
itracku_write,
itracku_exit,
- itracku_args,
+ &itracku_args,
CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr },
static route_head* trk;
-static arglist_t jogmap_args[] = {
- ARG_TERMINATOR
+static QVector<arglist_t> jogmap_args = {
};
#define MYNAME "xol"
jogmap_read,
nullptr,
nullptr,
- jogmap_args,
+ &jogmap_args,
CET_CHARSET_UTF8, 0
, NULL_POS_OPS,
nullptr
#define MYNAME "jtr"
static
-arglist_t jtr_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> jtr_args = {
};
static gbfile* fin, *fout;
jtr_read,
jtr_write,
nullptr,
- jtr_args,
+ &jtr_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static
-arglist_t kml_args[] = {
+QVector<arglist_t> kml_args = {
{"deficon", &opt_deficon, "Default icon name", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{
"lines", &opt_export_lines,
"Precision of coordinates, number of decimals",
DEFAULT_PRECISION, ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static
kml_read,
kml_write,
nullptr,
- kml_args,
+ &kml_args,
CET_CHARSET_UTF8, 1, /* CET-REVIEW */
{ nullptr, nullptr, nullptr, kml_wr_position_init, kml_wr_position, kml_wr_position_deinit },
nullptr
#define MYNAME "lmx"
static
-arglist_t lmx_args[] = {
+QVector<arglist_t> lmx_args = {
{
"binary", &binary,
"Compact binary representation",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*
lmx_read,
lmx_write,
nullptr,
- lmx_args,
+ &lmx_args,
CET_CHARSET_UTF8, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
// Combined arguments from previous lowranceusr and lowranceusr4 into single set.
// Use output format specified to determine if args are ignored.
static
-arglist_t lowranceusr_args[] = {
+QVector<arglist_t> lowranceusr_args = {
{
// Ignore Event Marker ICONs in input data
"ignoreicons", &opt_ignoreicons, "(USR input) Ignore event marker icons on read",
"", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void
data_read,
data_write,
nullptr,
- lowranceusr_args,
+ &lowranceusr_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
* Arg tables are doubled up so that -? can output appropriate help
*/
static
-arglist_t mag_sargs[] = {
+QVector<arglist_t> mag_sargs = {
{
"deficon", &deficon, "Default icon name", nullptr, ARGTYPE_STRING,
ARG_NOMINMAX, nullptr
"nukewpt", &nukewpt, "Delete all waypoints", nullptr, ARGTYPE_BOOL,
ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static
-arglist_t mag_fargs[] = {
+QVector<arglist_t> mag_fargs = {
{
"deficon", &deficon, "Default icon name", nullptr, ARGTYPE_STRING,
ARG_NOMINMAX, nullptr
"maxcmts", &cmts, "Max number of comments to write (maxcmts=200)",
nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*
mag_read,
mag_write,
nullptr,
- mag_sargs,
+ &mag_sargs,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr,
mag_read,
mag_write,
nullptr,
- mag_fargs,
+ &mag_fargs,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr,
mag_read,
mag_write,
nullptr,
- mag_fargs,
+ &mag_fargs,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr,
static int course_tmp, speed_tmp;
static
-arglist_t tr7_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> tr7_args = {
};
/*******************************************************************************
tr7_read,
tr7_write,
nullptr,
- tr7_args,
+ &tr7_args,
CET_CHARSET_UTF8, 1 /* FIXED - CET-REVIEW - */
, NULL_POS_OPS,
nullptr
static gbfile* fin;
static
-arglist_t mapbar_track_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> mapbar_track_args = {
};
/*******************************************************************************
mapbar_track_read,
nullptr,
nullptr,
- mapbar_track_args,
+ &mapbar_track_args,
CET_CHARSET_UTF8, 0
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static QXmlStreamWriter* writer;
static
-arglist_t mapfactor_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> mapfactor_args = {
};
#define MYNAME "mapfactor"
mapfactor_read,
mapfactor_write,
nullptr,
- mapfactor_args,
+ &mapfactor_args,
CET_CHARSET_UTF8, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define MAPSEND_TRKVER_MAX 4
static
-arglist_t mapsend_args[] = {
+QVector<arglist_t> mapsend_args = {
{
"trkver", &mapsend_opt_trkver,
"MapSend version TRK file to generate (3,4)",
"4", ARGTYPE_INT, "3", "4", nullptr
},
- ARG_TERMINATOR
};
static void
mapsend_read,
mapsend_wpt_write,
nullptr,
- mapsend_args,
+ &mapsend_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static char* mpsuseprox = nullptr;
static
-arglist_t mps_args[] = {
+QVector<arglist_t> mps_args = {
{
"snlen", &snlen, "Length of generated shortnames", "10", ARGTYPE_INT, "1",
nullptr, nullptr
"Use proximity values on output (default is ignore)",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void
mps_read,
mps_write,
nullptr,
- mps_args,
+ &mps_args,
CET_CHARSET_MS_ANSI, 0, /* CET-REVIEW */
NULL_POS_OPS,
nullptr,
static char* opt_locked, *opt_visible, *opt_version;
static
-arglist_t mmo_args[] = {
+QVector<arglist_t> mmo_args = {
{
"locked", &opt_locked, "Write items 'locked' [default no]", "0",
ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"ver", &opt_version, "Write files with internal version [n]", nullptr,
ARGTYPE_INT, "17", "18", nullptr
},
- ARG_TERMINATOR
};
struct mmo_data_t {
mmo_read,
mmo_write,
nullptr,
- mmo_args,
+ &mmo_args,
CET_CHARSET_MS_ANSI, 0
, NULL_POS_OPS,
nullptr
static char* opt_status;
static char* opt_enable;
-static arglist_t mtk_locus_args[] = {
+static QVector<arglist_t> mtk_locus_args = {
{"baudrate", &opt_baudrate, "Speed in bits per second of serial port (autodetect=0)", "0", ARGTYPE_INT, ARG_NOMINMAX , nullptr},
{"download", &opt_download, "Download logged fixes", "1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{"erase", &opt_erase, "Erase device data after download", "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{"status", &opt_status, "Show device status", "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{"enable", &opt_enable, "Enable logging after download", "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
static void mtk_locus_rd_init(const QString& fname);
mtk_locus_read,
nullptr, // write
nullptr, // exit
- mtk_locus_args,
+ &mtk_locus_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
, NULL_POS_OPS,
nullptr
// Arguments for log fetch 'mtk' command..
-static arglist_t mtk_sargs[] = {
+static QVector<arglist_t> mtk_sargs = {
{
"erase", &OPT_erase, "Erase device data after download",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"block_size_kb", &OPT_block_size_kb, "Size of blocks in KB to request from device",
"1", ARGTYPE_INT, "1", "64", nullptr
},
- ARG_TERMINATOR
};
static void dbg(int l, const char* msg, ...)
mtk_read,
nullptr,
nullptr,
- mtk_sargs,
+ &mtk_sargs,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
mtk_read,
nullptr,
nullptr,
- mtk_sargs,
+ &mtk_sargs,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
/* used for mtk-bin */
-static arglist_t mtk_fargs[] = {
+static QVector<arglist_t> mtk_fargs = {
{
"csv", &csv_file, "MTK compatible CSV output file",
nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
ff_vecs_t mtk_fvecs = {
file_read,
nullptr,
nullptr,
- mtk_fargs,
+ &mtk_fargs,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
, NULL_POS_OPS,
nullptr
file_read,
nullptr,
nullptr,
- mtk_fargs,
+ &mtk_fargs,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
, NULL_POS_OPS,
nullptr
static QString read_fname;
static
-arglist_t nav_args[] = {
+QVector<arglist_t> nav_args = {
{
"noretired", &noretired, "Suppress retired geocaches",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
#define MYNAME "navicache"
nav_read,
nullptr,
nullptr,
- nav_args,
+ &nav_args,
CET_CHARSET_UTF8, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static void ng_read_file_header();
static
-arglist_t ng_args[] = {
+QVector<arglist_t> ng_args = {
{
"output", &process, "'wp' - Create waypoint file , 'rte' - Create route file",
"rte", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"n", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*===================Utilities ==========================================*/
data_read,
data_write,
nullptr,
- ng_args,
+ &ng_args,
CET_CHARSET_HEBREW, 0
, NULL_POS_OPS,
nullptr
};
static
-arglist_t navilink_args[] = {
+QVector<arglist_t> navilink_args = {
{
"nuketrk", &nuketrk, "Delete all track points", nullptr, ARGTYPE_BOOL,
ARG_NOMINMAX, nullptr
"power_off", &poweroff, "Command unit to power itself down",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void (*write_waypoint)(const Waypoint*) = nullptr;
navilink_read,
navilink_write,
nullptr,
- navilink_args,
+ &navilink_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define MYNAME "NETSTUMBLER"
static
-arglist_t netstumbler_args[] = {
+QVector<arglist_t> netstumbler_args = {
{
"nseicon", &nseicon, "Non-stealth encrypted icon name",
"Red Square", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"snmac", &snmac, "Shortname is MAC address", nullptr, ARGTYPE_BOOL,
ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void
data_read,
nullptr,
nullptr,
- netstumbler_args,
+ &netstumbler_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static Waypoint* nmea_rd_posn(posn_status*);
static void nmea_rd_posn_init(const QString& fname);
-static arglist_t nmea_args[] = {
+static QVector<arglist_t> nmea_args = {
{"snlen", &snlenopt, "Max length of waypoint name to write", "6", ARGTYPE_INT, "1", "64", nullptr },
{"gprmc", &opt_gprmc, "Read/write GPRMC sentences", "1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{"gpgga", &opt_gpgga, "Read/write GPGGA sentences", "1", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
{"baud", &opt_baud, "Speed in bits per second of serial port (baud=4800)", nullptr, ARGTYPE_INT, ARG_NOMINMAX, nullptr },
{"gisteq", &opt_gisteq, "Write tracks for Gisteq Phototracker", "0", ARGTYPE_BOOL, ARG_NOMINMAX , nullptr},
{"ignore_fix", &opt_ignorefix, "Accept position fixes in gpgga marked invalid", "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr},
- ARG_TERMINATOR
};
#define CHECK_BOOL(a) if (a && (*a == '0')) a = NULL
nmea_read,
nmea_write,
nullptr,
- nmea_args,
+ &nmea_args,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
{
nmea_rd_posn_init, nmea_rd_posn, nmea_rd_deinit,
static char* index_opt;
static
-arglist_t nmn4_args[] = {
+QVector<arglist_t> nmn4_args = {
{"index", &index_opt, "Index of route to write (if more than one in source)", nullptr, ARGTYPE_INT, "1", nullptr , nullptr},
- ARG_TERMINATOR
};
nmn4_read,
nmn4_write,
nullptr,
- nmn4_args,
+ &nmn4_args,
CET_CHARSET_MS_ANSI, 1 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
class NukeDataFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
char* nuketrks;
char* nukertes;
- arglist_t args[4] = {
+ QVector<arglist_t> args = {
{
"waypoints", &nukewpts, "Remove all waypoints from data stream",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"routes", &nukertes, "Remove all routes from data stream",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
};
static char* opt_tag, *opt_tagnd, *created_by;
-static arglist_t osm_args[] = {
+static QVector<arglist_t> osm_args = {
{ "tag", &opt_tag, "Write additional way tag key/value pairs", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{ "tagnd", &opt_tagnd, "Write additional node tag key/value pairs", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{ "created_by", &created_by, "Use this value as custom created_by value","GPSBabel", ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
#define MYNAME "osm"
osm_read,
osm_write,
osm_exit,
- osm_args,
+ &osm_args,
CET_CHARSET_UTF8, 0
, NULL_POS_OPS,
nullptr};
static char* opt_codec;
static
-arglist_t ozi_args[] = {
+QVector<arglist_t> ozi_args = {
{
"pack", &pack_opt, "Write all tracks into one file",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"codec", &opt_codec, "codec to use for reading and writing strings (default windows-1252)",
"windows-1252", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static gpsdata_type ozi_objective;
data_read,
data_write,
nullptr,
- ozi_args,
+ &ozi_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#define MYNAME "PCX"
-static arglist_t pcx_args[] = {{"deficon", &deficon, "Default icon name",
+static QVector<arglist_t> pcx_args = {{"deficon", &deficon, "Default icon name",
"Waypoint", ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
{"cartoexploreur", &cartoexploreur,
"Write tracks compatible with Carto Exploreur",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr},
- ARG_TERMINATOR};
+ };
static void rd_init(const QString& fname) {
file_in = gbfopen(fname, "rb", MYNAME);
ff_vecs_t pcx_vecs = {
ff_type_file, FF_CAP_RW_ALL, rd_init, wr_init, rd_deinit,
- wr_deinit, data_read, data_write, nullptr, pcx_args,
+ wr_deinit, data_read, data_write, nullptr, &pcx_args,
CET_CHARSET_ASCII, 1 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
class PolygonFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
unsigned short override;
};
- arglist_t args[3] = {
+ QVector<arglist_t> args = {
{
"file", &polyfileopt, "File containing vertices of polygon",
nullptr, ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
"exclude", &exclopt, "Exclude points inside the polygon",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
void polytest(double lat1, double lon1,
class PositionFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
char* purge_duplicates = nullptr;
bool check_time;
- arglist_t args[4] = {
+ QVector<arglist_t> args = {
{
"distance", &distopt, "Maximum positional distance",
nullptr, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
"time", &timeopt, "Maximum time in seconds between two points",
nullptr, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
class WptRecord
static char* snlen;
static
-arglist_t psit_args[] = {
+QVector<arglist_t> psit_args = {
/* {"snlen", &snlen, "Length of generated shortnames",
NULL, ARGTYPE_INT, "1", NULL }, */
- ARG_TERMINATOR
};
/* Taken from PsiTrex 1.13 */
psit_read,
psit_write,
nullptr,
- psit_args,
+ &psit_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
class RadiusFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
double distance;
};
- arglist_t args[8] = {
+ QVector<arglist_t> args = {
{
"lat", &latopt, "Latitude for center point (D.DDDDD)",
nullptr, ARGTYPE_FLOAT | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
"asroute", &routename,"Put resulting waypoints in route of this name",
nullptr, ARGTYPE_STRING, nullptr, nullptr, nullptr
},
- ARG_TERMINATOR
};
double gc_distance(double lat1, double lon1, double lat2, double lon2);
static char* opt_points, *opt_seed, *opt_nodelay;
-static arglist_t random_args[] = {
+static QVector<arglist_t> random_args = {
{
"points", &opt_points, "Generate # points", nullptr,
ARGTYPE_INT, "1", nullptr, nullptr
"nodelay", &opt_nodelay, "Output realtime points without delay", nullptr,
ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
// this generator is invariant across platforms.
random_read,
nullptr, /* write */
nullptr, /* exit */
- random_args,
+ &random_args,
CET_CHARSET_ASCII, 1, /* fixed */
{
random_rd_posn_init, random_rd_posn, random_rd_posn_deinit,
#define MYNAME "raymarine"
static
-arglist_t raymarine_args[] = {
+QVector<arglist_t> raymarine_args = {
{ "location", &opt_location, "Default location", "My Waypoints", ARGTYPE_STRING, ARG_NOMINMAX , nullptr},
- ARG_TERMINATOR
};
/* from csv_util.c: convert excel time (days since 1900) to time_t and back again */
raymarine_read,
raymarine_write,
nullptr,
- raymarine_args,
+ &raymarine_args,
CET_CHARSET_ASCII, 0 /* should we force this to 1 ? */
, NULL_POS_OPS,
nullptr
class ReverseRouteFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
private:
int prev_new_trkseg;
- arglist_t args[1] = {
- ARG_TERMINATOR
+ QVector<arglist_t> args = {
};
void reverse_route_wpt(const Waypoint* waypointp);
static int control = 0;
static
-arglist_t saroute_args[] = {
+QVector<arglist_t> saroute_args = {
{
"turns_important", &turns_important,
"Keep turns if simplify filter is used",
"times", ×ynth, "Synthesize track times",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
#define ReadShort(f) gbfgetint16(f)
my_read,
nullptr,
nullptr,
- saroute_args,
+ &saroute_args,
CET_CHARSET_UTF8, 1 /* do nothing | CET-REVIEW */
, NULL_POS_OPS,
nullptr
static gbfile* file_handle = nullptr;
static
-arglist_t sbn_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> sbn_args = {
};
sbn_read,
nullptr,
sbn_exit,
- sbn_args,
+ &sbn_args,
/* Characters are always encoded in ASCII. Even if the unit is set
* to Chinese language, only ASCII characters can be entered. */
CET_CHARSET_ASCII, 0
static gbfile* file_handle = nullptr;
static
-arglist_t sbp_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> sbp_args = {
};
/*******************************************************************************
sbp_read,
nullptr,
sbp_exit,
- sbp_args,
+ &sbp_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static char* opt_url = nullptr;
static
-arglist_t shp_args[] = {
+QVector<arglist_t> shp_args = {
{
"name", &opt_name, "Source for name field in .dbf",
nullptr, ARGTYPE_STRING, "0", nullptr, nullptr
"url", &opt_url, "Source for URL field in .dbf",
nullptr, ARGTYPE_STRING, "0", nullptr, nullptr
},
- ARG_TERMINATOR
};
my_read,
my_write,
nullptr,
- shp_args,
+ &shp_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static
-arglist_t skyforce_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> skyforce_args = {
};
static gbfile* fin, *fout;
skyforce_read,
skyforce_write,
nullptr,
- skyforce_args,
+ &skyforce_args,
CET_CHARSET_ASCII, 1
, NULL_POS_OPS,
nullptr
static char* opt_gps_week_rollover = nullptr;
static
-arglist_t skytraq_args[] = {
+QVector<arglist_t> skytraq_args = {
{
"erase", &opt_erase, "Erase device data after download",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"gps-week-rollover", &opt_gps_week_rollover, "GPS week rollover period we're in (-1: best guess)",
"-1", ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR,
};
static
-arglist_t skytraq_fargs[] = {
+QVector<arglist_t> skytraq_fargs = {
{
"first-sector", &opt_first_sector, "First sector to be read from the file",
"0", ARGTYPE_INT, "0", "65535", nullptr
"gps-week-rollover", &opt_gps_week_rollover, "GPS week rollover period we're in (-1: best guess)",
"-1", ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void
skytraq_read,
nullptr,
nullptr,
- skytraq_args,
+ &skytraq_args,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything */
, NULL_POS_OPS,
nullptr
file_read,
nullptr,
nullptr,
- skytraq_fargs,
+ &skytraq_fargs,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything */
, NULL_POS_OPS,
nullptr
static char* opt_set_poi_boat = nullptr; /* set if a "poi" option was used */
static char* opt_set_poi_heart = nullptr; /* set if a "poi" option was used */
static char* opt_set_poi_bar = nullptr; /* set if a "poi" option was used */
-static arglist_t miniHomer_args[] = {
+static QVector<arglist_t> miniHomer_args = {
{ "baud", &opt_dlbaud, "Baud rate used for download", "115200", ARGTYPE_INT, "0", "115200", nullptr },
{ "dump-file", &opt_dump_file, "Dump raw data to this file", nullptr, ARGTYPE_OUTFILE, ARG_NOMINMAX, nullptr },
{ "erase", &opt_erase, "Erase device data after download", "0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
"gps-week-rollover", &opt_gps_week_rollover, "GPS week rollover period we're in (-1: best guess)",
"-1", ARGTYPE_INT, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/*
* Names of the POIs on miniHomer
miniHomer_read,
nullptr,
nullptr,
- miniHomer_args,
+ &miniHomer_args,
CET_CHARSET_UTF8, 1, /* master process: don't convert anything */
NULL_POS_OPS,
nullptr
class SimplifyRouteFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
char* relopt;
void (*waypt_del_fnp)(route_head* rte, Waypoint* wpt);
- arglist_t args[6] = {
+ QVector<arglist_t> args = {
{
"count", &countopt, "Maximum number of points in route",
nullptr, ARGTYPE_INT | ARGTYPE_BEGIN_REQ | ARGTYPE_BEGIN_EXCL, "1", nullptr, nullptr
"relative", &relopt, "Use relative error", nullptr,
ARGTYPE_BOOL | ARGTYPE_END_EXCL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct xte_intermed;
class SortFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
char* opt_sm_rtenum, *opt_sm_rtename, *opt_sm_rtedesc;
char* opt_sm_trknum, *opt_sm_trkname, *opt_sm_trkdesc;
- arglist_t args[11] = {
+ QVector<arglist_t> args = {
{
"description", &opt_sm_description, "Sort waypoints by description",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"trknum", &opt_sm_trknum, "Sort tracks by number",
nullptr, ARGTYPE_BEGIN_EXCL | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static bool sort_comp_wpt_by_description(const Waypoint* a, const Waypoint* b);
class StackFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
int warnings_enabled = 1;
int swapdepth = 0;
- arglist_t args[10] = {
+ QVector<arglist_t> args = {
{
"push", &opt_push, "Push waypoint list onto stack", nullptr,
ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"nowarn", &nowarn, "Suppress cleanup warning", nullptr,
ARGTYPE_BOOL | ARGTYPE_HIDDEN, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
struct stack_elt
static int opt_route_index_value;
static
-arglist_t stmsdf_args[] = {
+QVector<arglist_t> stmsdf_args = {
{
"index", &opt_route_index,
"Index of route (if more than one in source)", "1", ARGTYPE_INT, "1", nullptr, nullptr
},
- ARG_TERMINATOR
};
data_read,
data_write,
nullptr,
- stmsdf_args,
+ &stmsdf_args,
CET_CHARSET_MS_ANSI, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static char* index_opt = nullptr;
static
-arglist_t stmwpp_args[] = {
+QVector<arglist_t> stmwpp_args = {
{
"index", &index_opt, "Index of route/track to write (if more than one in source)",
nullptr, ARGTYPE_INT, "1", nullptr, nullptr
},
- ARG_TERMINATOR
};
stmwpp_data_read,
stmwpp_data_write,
nullptr,
- stmwpp_args,
+ &stmwpp_args,
CET_CHARSET_MS_ANSI, 0
, NULL_POS_OPS,
nullptr
/* arguments: definitions of format-specific arguments */
-static arglist_t subrip_args[] = {
+static QVector<arglist_t> subrip_args = {
// FIXME: document that gps_date and gps_time must be specified together or they will both be ignored and the timestamp of the first trackpoint will be used.
{"video_time", &opt_videotime, "Video position for which exact GPS time is known (hhmmss, default is 0:00:00)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{"gps_time", &opt_gpstime, "GPS time at position video_time (hhmmss, default is first timestamp of track)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{"gps_date", &opt_gpsdate, "GPS date at position video_time (hhmmss, default is first timestamp of track)", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
{"format", &opt_format, "Format for subtitles", "%s km/h %e m\\n%t %l", ARGTYPE_STRING, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
/* manifest: capabilities of this module, pointers to exported functions and others */
nullptr,
subrip_write,
nullptr,
- subrip_args,
+ &subrip_args,
CET_CHARSET_ASCII, 0
, NULL_POS_OPS,
nullptr
#ifndef SWAPDATA_H_INCLUDED_
#define SWAPDATA_H_INCLUDED_
-#include "defs.h" // for Waypoint (ptr only), arglist_t, ARG_TERMINATOR
+#include "defs.h" // for arglist_t, Waypoint
#include "filter.h" // for Filter
#if FILTERS_ENABLED
class SwapDataFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
private:
- arglist_t args[1] = {
- ARG_TERMINATOR
+ QVector<arglist_t> args = {
};
void swapdata_cb(const Waypoint* ref);
static char* routevia = nullptr;
-static arglist_t tef_xml_args[] = {
+static QVector<arglist_t> tef_xml_args = {
{
"routevia", &routevia, "Include only via stations in route",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
#define MYNAME "TourExchangeFormat"
tef_xml_read,
nullptr,
nullptr,
- tef_xml_args,
+ &tef_xml_args,
CET_CHARSET_UTF8, 1
, NULL_POS_OPS,
nullptr
static
-arglist_t teletype_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> teletype_args = {
};
/*******************************************************************************
teletype_read,
nullptr,
teletype_exit,
- teletype_args,
+ &teletype_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
#define MYNAME "TEXT"
static
-arglist_t text_args[] = {
+QVector<arglist_t> text_args = {
{
"nosep", &suppresssep,
"Suppress separator lines between waypoints",
"Write each waypoint in a separate file", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
nullptr,
data_write,
nullptr,
- text_args,
+ &text_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static
-arglist_t tiger_args[] = {
+QVector<arglist_t> tiger_args = {
{
"nolabels", &nolabels, "Suppress labels on generated pins",
nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
NULL, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
#endif
- ARG_TERMINATOR
};
data_read,
data_write,
nullptr,
- tiger_args,
+ &tiger_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static gbfile* file_out;
static
-arglist_t tomtom_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> tomtom_args = {
};
static void
data_read,
data_write,
nullptr,
- tomtom_args,
+ &tomtom_args,
CET_CHARSET_MS_ANSI, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
static unsigned int waypt_out_count;
static
-arglist_t tpg_args[] = {
+QVector<arglist_t> tpg_args = {
{"datum", &tpg_datum_opt, "Datum (default=NAD27)", "N. America 1927 mean", ARGTYPE_STRING, ARG_NOMINMAX , nullptr},
- ARG_TERMINATOR
};
static int
tpg_read,
tpg_write,
nullptr,
- tpg_args,
+ &tpg_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr};
#ifdef ENABLE_TPO_WRITE
static
-arglist_t tpo2_args[] = {
+QVector<arglist_t> tpo2_args = {
{ "dumpheader", &dumpheader, "Display the file header bytes",
"0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
{ "state", &output_state, "State map format to write, default=CA",
"CA", ARGTYPE_STRING, ARG_NOMINMAX} ,
- ARG_TERMINATOR
};
#else
//
// above.
//
static
-arglist_t tpo2_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> tpo2_args = {
};
#endif
static
-arglist_t tpo3_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> tpo3_args = {
};
nullptr,
#endif
nullptr,
- tpo2_args,
+ &tpo2_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
tpo_read,
nullptr,
nullptr,
- tpo3_args,
+ &tpo3_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
int TrackFilter::trackfilter_opt_count()
{
int res = 0;
- arglist_t* a = args;
- while (a->argstring) {
- if (*a->argval != nullptr) {
+ for (const auto& arg : qAsConst(args)) {
+ if (*arg.argval != nullptr) {
res++;
}
- a++;
}
return res;
}
class TrackFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void init() override;
void process() override;
char* opt_minpoints = nullptr;
int minimum_points{0};
- arglist_t args[19] = {
+ QVector<arglist_t> args = {
{
TRACKFILTER_MOVE_OPTION, &opt_move,
"Correct trackpoint timestamps by a delta", nullptr, ARGTYPE_STRING,
"Discard tracks with fewer than these points",
nullptr, ARGTYPE_INT, "0", "50", nullptr
},
- ARG_TERMINATOR
};
QList<route_head*> track_list;
class TransformFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
const QString RPT = "RPT";
- arglist_t args[7] = {
+ QVector<arglist_t> args = {
{
"wpt", &opt_waypts, "Transform track(s) or route(s) into waypoint(s) [R/T]", nullptr,
ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"del", &opt_delete, "Delete source data after transformation", "N",
ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
void transform_waypoints();
static char unicsv_detect;
static int llprec;
-static arglist_t unicsv_args[] = {
+static QVector<arglist_t> unicsv_args = {
{
"datum", &opt_datum, "GPS datum (def. WGS 84)",
"WGS 84", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"codec", &opt_codec, "codec to use for reading and writing strings (default UTF-8)",
"UTF-8", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
unicsv_rd,
unicsv_wr,
nullptr,
- unicsv_args,
+ &unicsv_args,
CET_CHARSET_UTF8, 0
, NULL_POS_OPS,
nullptr
class ValidateFilter:public Filter
{
public:
- arglist_t* get_args() override
+ QVector<arglist_t>* get_args() override
{
- return args;
+ return &args;
}
void process() override;
unsigned int head_ct;
unsigned int segment_ct_start;
const char* segment_type;
- arglist_t args[3] = {
+ QVector<arglist_t> args = {
{
"checkempty", &opt_checkempty, "Check for empty input",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
"debug", &opt_debug, "Output debug messages instead of possibly issuing a fatal error",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
void validate_head(const route_head*);
#define MYNAME "VCF"
static
-arglist_t vcf_args[] = {
+QVector<arglist_t> vcf_args = {
{
"encrypt", &vcf_encrypt,
"Encrypt hints using ROT13", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static void
nullptr,
data_write,
nullptr,
- vcf_args,
+ &vcf_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr
#endif // MAXIMAL_ENABLED
};
+/*
+ * When we modify an element on the list we need to be careful
+ * that we are not modifying a Qt COW copy.
+ * Qt has an undocumented but public member function isDetached().
+ * If the list is detached it implies it is not shared, then functions
+ * then might detach, like the iterator begin which is implcitly used
+ * in the range based for loop, won't cause a copy to be created.
+ * We can make sure this is true for at least our regression cases
+ * with assertions.
+ * There is an odd situation that an empty QVector is not detached,
+ * so we have to exclude this from the check.
+ * The possibility of detachement is also why the type of element
+ * on the list must be default constructable. This is why we have
+ * to supply a default for any const members of arglist_t. Without
+ * the default the default constructor would be implicitly deleted.
+ */
+
void
init_vecs()
{
for (const auto& vec : vec_list) {
- if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
- arg->argvalptr = nullptr;
- if (arg->argval) {
- *arg->argval = nullptr;
+ if (vec.vec->args && !vec.vec->args->isEmpty()) {
+ assert(vec.vec->args->isDetached());
+ for (auto& arg : *vec.vec->args) {
+ arg.argvalptr = nullptr;
+ if (arg.argval) {
+ *arg.argval = nullptr;
}
}
}
if (vec.vec->exit) {
(*vec.vec->exit)();
}
- if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
- if (arg->argvalptr) {
- xfree(arg->argvalptr);
- *arg->argval = arg->argvalptr = nullptr;
+ if (vec.vec->args && !vec.vec->args->isEmpty()) {
+ assert(vec.vec->args->isDetached());
+ for (auto& arg : *vec.vec->args) {
+ if (arg.argvalptr) {
+ xfree(arg.argvalptr);
+ *arg.argval = arg.argvalptr = nullptr;
}
}
}
}
void
-disp_vec_options(const QString& vecname, const arglist_t* args)
+disp_vec_options(const QString& vecname, const QVector<arglist_t>* args)
{
if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (*arg->argval && arg->argval) {
+ for (const auto& arg : *args) {
+ if (*arg.argval && arg.argval) {
printf("options: module/option=value: %s/%s=\"%s\"",
- qPrintable(vecname), arg->argstring, *arg->argval);
- if (arg->defaultvalue && (case_ignore_strcmp(arg->defaultvalue, *arg->argval) == 0)) {
+ qPrintable(vecname), arg.argstring, *arg.argval);
+ if (arg.defaultvalue && (case_ignore_strcmp(arg.defaultvalue, *arg.argval) == 0)) {
printf(" (=default)");
}
printf("\n");
}
}
-void validate_options(const QStringList& options, const arglist_t* args, const QString& name)
+void validate_options(const QStringList& options, const QVector<arglist_t>* args, const QString& name)
{
for (const auto& option : options) {
const QString option_name = option.left(option.indexOf('='));
bool valid = false;
if (args) {
- for (auto arg = args; arg->argstring; arg++) {
- if (option_name.compare(arg->argstring, Qt::CaseInsensitive) == 0) {
+ for (const auto& arg : *args) {
+ if (option_name.compare(arg.argstring, Qt::CaseInsensitive) == 0) {
valid = true;
break;
}
validate_options(options, vec.vec->args, vec.name);
- if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
+ if (vec.vec->args && !vec.vec->args->isEmpty()) {
+ assert(vec.vec->args->isDetached());
+ for (auto& arg : *vec.vec->args) {
if (!options.isEmpty()) {
- const QString opt = get_option(options, arg->argstring);
+ const QString opt = get_option(options, arg.argstring);
if (!opt.isNull()) {
- assign_option(vec.name, arg, CSTR(opt));
+ assign_option(vec.name, &arg, CSTR(opt));
continue;
}
}
- QString qopt = inifile_readstr(global_opts.inifile, vec.name, arg->argstring);
+ QString qopt = inifile_readstr(global_opts.inifile, vec.name, arg.argstring);
if (qopt.isNull()) {
- qopt = inifile_readstr(global_opts.inifile, "Common format settings", arg->argstring);
+ qopt = inifile_readstr(global_opts.inifile, "Common format settings", arg.argstring);
}
if (qopt.isNull()) {
- assign_option(vec.name, arg, arg->defaultvalue);
+ assign_option(vec.name, &arg, arg.defaultvalue);
} else {
- assign_option(vec.name, arg, CSTR(qopt));
+ assign_option(vec.name, &arg, CSTR(qopt));
}
}
}
continue;
}
- validate_options(options, vec_list[0].vec->args, svec.name);
+ validate_options(options, vec_list.at(0).vec->args, svec.name);
- if (vec_list[0].vec->args) {
- for (auto arg = vec_list[0].vec->args; arg->argstring; arg++) {
+ if (vec_list[0].vec->args && !vec_list[0].vec->args->isEmpty()) {
+ assert(vec_list[0].vec->args->isDetached());
+ for (auto& arg : *vec_list[0].vec->args) {
if (!options.isEmpty()) {
- const QString opt = get_option(options, arg->argstring);
+ const QString opt = get_option(options, arg.argstring);
if (!opt.isNull()) {
- assign_option(svec.name, arg, CSTR(opt));
+ assign_option(svec.name, &arg, CSTR(opt));
continue;
}
}
- QString qopt = inifile_readstr(global_opts.inifile, svec.name, arg->argstring);
+ QString qopt = inifile_readstr(global_opts.inifile, svec.name, arg.argstring);
if (qopt.isNull()) {
- qopt = inifile_readstr(global_opts.inifile, "Common format settings", arg->argstring);
+ qopt = inifile_readstr(global_opts.inifile, "Common format settings", arg.argstring);
}
if (qopt.isNull()) {
- assign_option(svec.name, arg, arg->defaultvalue);
+ assign_option(svec.name, &arg, arg.defaultvalue);
} else {
- assign_option(svec.name, arg, CSTR(qopt));
+ assign_option(svec.name, &arg, CSTR(qopt));
}
}
}
svp.append(uvec);
}
+ /* The style formats are based on the xcsv format,
+ * Make sure we know which entry in the vector list that is.
+ */
+ assert(vec_list.at(0).name == "xcsv");
+ /* The style formats use a modified xcsv argument list that doesn't include
+ * the option to set the style file. Make sure we know which entry in
+ * the argument list that is.
+ */
+ assert(case_ignore_strcmp(vec_list.at(0).vec->args->at(0).helpstring,
+ "Full path to XCSV style file") == 0);
+ /* Prepare a modified argument list for the style formats. */
+ auto xcsv_args = new QVector<arglist_t>(*vec_list.at(0).vec->args); /* LEAK */
+ xcsv_args->removeFirst();
+
/* Walk the style list, parse the entries, dummy up a "normal" vec */
for (const auto& svec : style_list) {
xcsv_read_internal_style(svec.style_buf);
uvec.name = svec.name;
uvec.vec = new ff_vecs_t; /* LEAK */
uvec.extensions = xcsv_file.extension;
- *uvec.vec = *vec_list[0].vec; /* Inherits xcsv opts */
+ *uvec.vec = *vec_list.at(0).vec; /* Inherits xcsv opts */
/* Reset file type to inherit ff_type from xcsv. */
uvec.vec->type = xcsv_file.type;
/* Skip over the first help entry for all but the
* actual 'xcsv' format - so we don't expose the
- * 'full path to xcsv style file' argument to any
+ * 'Full path to XCSV style file' argument to any
* GUIs for an internal format.
*/
- uvec.vec->args++;
+ uvec.vec->args = xcsv_args;
memset(&uvec.vec->cap, 0, sizeof(uvec.vec->cap));
switch (xcsv_file.datatype) {
case unknown_gpsdata:
}
printf(VEC_FMT, qPrintable(vec.name), qPrintable(vec.desc));
if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN))
+ for (const auto& arg : qAsConst(*vec.vec->args)) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN))
printf(" %-18.18s %s%-.50s %s\n",
- arg->argstring,
- (arg->argtype & ARGTYPE_TYPEMASK) ==
+ arg.argstring,
+ (arg.argtype & ARGTYPE_TYPEMASK) ==
ARGTYPE_BOOL ? "(0/1) " : "",
- arg->helpstring,
- (arg->argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
+ arg.helpstring,
+ (arg.argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
}
}
}
printf(VEC_FMT, qPrintable(vec.name), qPrintable(vec.desc));
if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN))
+ for (const auto& arg : qAsConst(*vec.vec->args)) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN))
printf(" %-18.18s %s%-.50s %s\n",
- arg->argstring,
- (arg->argtype & ARGTYPE_TYPEMASK) ==
+ arg.argstring,
+ (arg.argtype & ARGTYPE_TYPEMASK) ==
ARGTYPE_BOOL ? "(0/1) " : "",
- arg->helpstring,
- (arg->argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
+ arg.helpstring,
+ (arg.argtype & ARGTYPE_REQUIRED) ? "(required)" : "");
}
}
}
{
disp_help_url(vec, nullptr);
if (vec.vec->args) {
- for (auto arg = vec.vec->args; arg->argstring; arg++) {
- if (!(arg->argtype & ARGTYPE_HIDDEN)) {
+ for (const auto& arg : qAsConst(*vec.vec->args)) {
+ if (!(arg.argtype & ARGTYPE_HIDDEN)) {
printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
CSTR(vec.name),
- arg->argstring,
- arg->helpstring,
- name_option(arg->argtype),
- arg->defaultvalue ? arg->defaultvalue : "",
- arg->minvalue ? arg->minvalue : "",
- arg->maxvalue ? arg->maxvalue : "");
+ arg.argstring,
+ arg.helpstring,
+ name_option(arg.argtype),
+ arg.defaultvalue ? arg.defaultvalue : "",
+ arg.minvalue ? arg.minvalue : "",
+ arg.maxvalue ? arg.maxvalue : "");
}
- disp_help_url(vec, arg);
+ disp_help_url(vec, &arg);
printf("\n");
}
}
}
}
-bool validate_args(const QString& name, const arglist_t* args)
+//#define FIND_ALL_NULLPTR_ARGUMENTS
+//#define FIND_ALL_EMPTY_ARGUMENT_LISTS
+
+bool validate_args(const QString& name, const QVector<arglist_t>* args)
{
bool ok = true;
+#ifdef FIND_ALL_NULLPTR_ARGUMENTS
+ if (args == nullptr) {
+ Warning() << name << "Is passing nullptr for arguments.";
+ }
+#endif
+
if (args != nullptr) {
- for (auto arg = args; arg->argstring; arg++) {
- if (arg->argtype == ARGTYPE_INT) {
- if (arg->defaultvalue &&
- ! is_integer(arg->defaultvalue)) {
- Warning() << name << "Int option" << arg->argstring << "default value" << arg->defaultvalue << "is not an integer.";
+#ifdef FIND_ALL_EMPTY_ARGUMENT_LISTS
+ if (args->isEmpty()) {
+ Warning() << name << "It isn't necessary to use an empty argument list, you can pass nullptr.";
+ }
+#endif
+ for (const auto& arg : *args) {
+ if (arg.argtype == ARGTYPE_INT) {
+ if (arg.defaultvalue &&
+ ! is_integer(arg.defaultvalue)) {
+ Warning() << name << "Int option" << arg.argstring << "default value" << arg.defaultvalue << "is not an integer.";
ok = false;
}
- if (arg->minvalue &&
- ! is_integer(arg->minvalue)) {
- Warning() << name << "Int option" << arg->argstring << "minimum value" << arg->minvalue << "is not an integer.";
+ if (arg.minvalue &&
+ ! is_integer(arg.minvalue)) {
+ Warning() << name << "Int option" << arg.argstring << "minimum value" << arg.minvalue << "is not an integer.";
ok = false;
}
- if (arg->maxvalue &&
- ! is_integer(arg->maxvalue)) {
- Warning() << name << "Int option" << arg->argstring << "maximum value" << arg->maxvalue << "is not an integer.";
+ if (arg.maxvalue &&
+ ! is_integer(arg.maxvalue)) {
+ Warning() << name << "Int option" << arg.argstring << "maximum value" << arg.maxvalue << "is not an integer.";
ok = false;
}
}
static int vidaone_ver;
static
-arglist_t vidaone_args[] = {
+QVector<arglist_t> vidaone_args = {
{
VIDAONE_VER, &vidaone_opt_ver,
"Version of VidaOne file to read or write (1 or 2)",
"1", ARGTYPE_INT, "1", "2", nullptr
},
- ARG_TERMINATOR
};
static gbfile* fin, *fout;
vidaone_read,
vidaone_write,
nullptr,
- vidaone_args,
+ &vidaone_args,
CET_CHARSET_UTF8, 1
, NULL_POS_OPS,
nullptr
static void vpl_parse_75_sentence(const char*);
static
-arglist_t vpl_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> vpl_args = {
};
static gbfile* vpl_file_in;
vpl_read,
nullptr,
nullptr,
- vpl_args,
+ &vpl_args,
CET_CHARSET_ASCII, /* ascii is the expected character set */
1 /* fixed, can't be changed through command line parameter */
, NULL_POS_OPS,
/* wbt */
-static arglist_t wbt_sargs[] = {
+static QVector<arglist_t> wbt_sargs = {
{
"erase", &erase, "Erase device data after download",
"0", ARGTYPE_BOOL, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
ff_vecs_t wbt_svecs = {
data_read,
nullptr,
nullptr,
- wbt_sargs,
+ &wbt_sargs,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
, NULL_POS_OPS,
nullptr
/* used for wbt-bin /and/ wbt-tk1 */
-static arglist_t wbt_fargs[] = {
- ARG_TERMINATOR
+static QVector<arglist_t> wbt_fargs = {
};
ff_vecs_t wbt_fvecs = {
file_read,
nullptr,
nullptr,
- wbt_fargs,
+ &wbt_fargs,
CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
, NULL_POS_OPS,
nullptr
static char* snmac =nullptr;
static
-arglist_t wfff_xml_args[] = {
+QVector<arglist_t> wfff_xml_args = {
{
"aicicon", &aicicon, "Infrastructure closed icon name",
"Red Square", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
"Green Diamond", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
{"snmac", &snmac, "Shortname is MAC address", nullptr, ARGTYPE_BOOL, ARG_NOMINMAX, nullptr },
- ARG_TERMINATOR
};
#define xfreez(p) { if (p) xfree(p); p=0; }
wfff_xml_read,
nullptr,
nullptr,
- wfff_xml_args,
+ &wfff_xml_args,
CET_CHARSET_UTF8, 0,
NULL_POS_OPS,
nullptr
}
static
-arglist_t wintec_tes_args[] = {
- ARG_TERMINATOR
+QVector<arglist_t> wintec_tes_args = {
};
ff_vecs_t wintec_tes_vecs = {
wintec_tes_read,
nullptr,
nullptr,
- wintec_tes_args,
+ &wintec_tes_args,
CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
/* not fixed, can be changed through command line parameter */
, NULL_POS_OPS,
static const char* intstylebuf = nullptr;
static
-arglist_t xcsv_args[] = {
+QVector<arglist_t> xcsv_args = {
{
"style", &styleopt, "Full path to XCSV style file", nullptr,
ARGTYPE_FILE | ARGTYPE_REQUIRED, ARG_NOMINMAX, nullptr
"datum", &opt_datum, "GPS datum (def. WGS 84)",
"WGS 84", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
/* something to map config file constants to chars */
xcsv_data_read,
xcsv_data_write,
nullptr,
- xcsv_args,
+ &xcsv_args,
CET_CHARSET_ASCII, 0, /* CET-REVIEW */
{ nullptr, nullptr, nullptr, xcsv_wr_position_init, xcsv_wr_position, xcsv_wr_position_deinit },
nullptr
static gpsbabel::File* oqfile;
static gpsbabel::XmlStreamWriter* writer;
-static arglist_t xol_args[] = {ARG_TERMINATOR};
+static QVector<arglist_t> xol_args = {};
#define MYNAME "xol"
xol_read,
xol_write,
nullptr,
- xol_args,
+ &xol_args,
CET_CHARSET_UTF8,
0 , NULL_POS_OPS,
nullptr
#define MYNAME "yahoo"
static
-arglist_t yahoo_args[] = {
+QVector<arglist_t> yahoo_args = {
{
"addrsep", &as,
"String to separate concatenated address fields (default=\", \")",
", ", ARGTYPE_STRING, ARG_NOMINMAX, nullptr
},
- ARG_TERMINATOR
};
static xg_callback wpt_s, wpt_lat, wpt_lon, wpt_e;
yahoo_read,
nullptr,
nullptr,
- yahoo_args,
+ &yahoo_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
, NULL_POS_OPS,
nullptr